package com.chuck.learning.mains;

import java.util.Scanner;

public class Main1 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String str = scanner.nextLine();
            str = str.trim();
            System.out.println(getInt(str));
        }
    }

    public static int getInt(String str){
        String []strings = str.split(" ");
        return  strings[strings.length - 1].length();
    }
}